﻿using Microsoft.Xna.Framework;
using Terraria;

namespace WorseGame.Common.MyUtils
{
    public static class WorseUtil
    {
        public static Rectangle GetItemHitbox(this Player player, Item item)
        {
            int width = (int)(item.width * player.direction * item.scale);
            int height = (int)(item.height * item.scale);
            return new Rectangle((int)(player.itemLocation.X - (width >> 1)), (int)(player.itemLocation.Y - (height >> 1)), width, height);
        }
    }
}
